package ArrayList;

import Fecse.Student;
import extend.Student1;

import java.util.*;

public class TestTes {
    public static void main(String[] args) {
        Map Student = new HashMap();//map去重
        Student.put("1","Q仔");
        Student.put("2","Q妹");
        Student.put("3","Q妹");
        Student.put("3","Q妹");
        Set key= Student.keySet();
        Iterator Student2=key.iterator();
        while(Student2.hasNext()){
            String keys=(String) Student2.next();
            String value=(String) Student.get(keys);
            System.out.println(keys+"\t"+ value);
        }

        Set<String> Student1=new HashSet();//Set去重
        Student1.add("1Q仔");
        Student1.add("2Q妹");
        Student1.add("3Q妹");
        Student1.add("3Q妹");

        Iterator  Students= Student1.iterator();
        while(Students.hasNext()){
            String Se=(String) Students.next();
            System.out.println(Se);
        }

    }
}
